<?php

	class AbstractSocialNetworkAlertsController extends AppController
	{
		
		var $components = array('Auth');
		var $helpers = array('Html','Form','Sociable.SocialConnect');
		var $SocialNetworkAlert;
		function configure()
		{
			if($this->data)
			{
				if($this->SocialNetworkAlert->saveAlerts($this->Session->read('Auth.User.id'),$this->data))
				{
					$this->successMsg(__("Your settings has been configured"));
					$this->afterConfigure();
				}
			}else
			{
				$this->data  = $this->SocialNetworkAlert->getEventInfo($this->Session->read('Auth.User.id'));
			}
			$this->set('activeAlerts',$this->SocialNetworkAlert->getActiveAlerts());
		}
		
		private function ide_method()
		{
			$this->SocialNetworkAlert = new SocialNetworkAlert();
		}
		
		function afterConfigure()
		{
			$this->redirect('/');
		}
	}
?>